package com.whminwei.edu.api.student.dto.feq;

import com.whminwei.common.valid.ZhAndEn;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author wangy
 * @since 2024/5/17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClasseFeq {

    /**
     * 计划招生学年
     */
    @NotNull(message = "计划招生学年不能为空")
    private Integer schYear;

    @Valid
    @NotEmpty(message = "班级信息不能为空")
    private List<ClasseBo> classeBos;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ClasseBo {

        /**
         * 班级名称
         */
        @ZhAndEn(min = 2, max = 25, message = "班级名称不符合输入限制")
        private String classeName;

        /**
         * 入学年级
         */
        @NotNull(message = "入学年级不能为空")
        private Integer enrollYear;

        /**
         * 班主任
         */
        @NotBlank(message = "班主任不能为空")
        private String directorId;

        /**
         * 专业id
         */
        @NotBlank(message = "专业不能为空")
        private String majorId;

        /**
         * 房间id
         */
        @NotBlank(message = "教室不能为空")
        private String roomId;

        /**
         * 人培方案id
         */
        @NotBlank(message = "人培方案不能为空")
        private String eduSchemeId;
    }
}
